package com.xdap.keymen.controller.punch;

import com.xdap.keymen.entity.PunchXdapDepartmentsEntity;
import com.xdap.keymen.service.punch.PunchDeptService;
import com.xdap.motor.annotation.RestWrapper;
import com.xdap.motor.vo.ResponseVo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/custom/punch/dept")
@RequiredArgsConstructor
@Slf4j
public class PunchDeptController {
    private final PunchDeptService deptService;
    @GetMapping("/list")
    @RestWrapper
    public ResponseVo getDeptList(String upddate) {
        return deptService.getDeptList(upddate);
    }

    @GetMapping("/test")
    @RestWrapper
    public PunchXdapDepartmentsEntity getDeptDetail(String deptCode) {
        return deptService.getPunchXadpDept(deptCode);
    }

}
